This invention relates to client-server computing systems operating under the Internet Protocol, and more particularly to a switch and methods for switching client IP packets in a prescribed order to a server selected from a group of servers.
With the advent of the World Wide Web (xe2x80x9cWWWxe2x80x9d), a universal client-server computing platform has emerged on the Internet. A very large number of web-servers on the Internet are serving web applications, which interact with web browsers acting as clients. A web application is typically organized into a hierarchy of webpages, scripted in Hypertext Markup Language (xe2x80x9cHTMLxe2x80x9d) and/or Extensible Markup Language (xe2x80x9cXMLxe2x80x9d.) It operates under the HyperText Transfer Protocol (xe2x80x9cHTTPxe2x80x9d.) A web application could itself be a suite of applications, including access and manipulation of databases, media and other resources hosted on one or more servers.
The resources provided by the servers are called up by their respective Uniform Resource Locator (xe2x80x9cURLxe2x80x9d). Generally, an URL will contain an IP address that points to a server followed by additional pointers to files residing on the server. In the case of a web application, a client browser can therefore access a webpage or a link by its URL. In particular, the browser typically first accesses the web application by its website address, which is a portal address of the application, calling up a homepage with links to the hierarchy of webpages. For example, a commercial entity may create an on-line shopping site, xe2x80x9cwww.onlineshop.comxe2x80x9d, for customers to browse and purchase merchandise on the Internet. The domain name address xe2x80x9cwww.onlineshop.comxe2x80x9d is an alias for the IP address that points to where the application resides on the Internet.
One problem this new computing paradigm presents is the need for the server hosting a web application to meet the potentially huge demand from the clients. The global nature of the Internet has meant that at any time there could be millions of clients attempting to access the same web application. A common solution is to host the web application in a data center.
FIG. 1 illustrates a data center hosting the web application by means of a server farm. Multiple replicas of the web application are made available from a group of servers, known collectively as a xe2x80x9cserver farmxe2x80x9d. The data center provides a multiplicity of web servers and other related servers for hosting multiple copies of a web application and related resources. This architecture allows easy scaling of resource capacity to meet increased demand. When a client request comes in, a LAN/Web switch performs a load-balancing function by connect it to one of the less busy servers in the group.
The URL of the website for the web application now points to the LAN/Web switch so that when a browser addresses the web application, the client packets are initially directed to the LAN/Web switch. The LAN/Web switch then switches the packets to one of the less busy servers in the data center based on load-balancing considerations. The switching is done using information associated with Layers 2-4 of the Open system Interconnection (xe2x80x9cOSIxe2x80x9d) model, or the more specific Transmission Control Protocol/Internet Protocol (xe2x80x9cTCP/IPxe2x80x9d).
FIG. 2 is a table illustrating the protocol layers of the OSI model, the corresponding TCP/IP protocol stacks, and the types of conventional switching and routing operable at each layer. According to the OSI model, each device on a network implements the seven OSI layers in a modular fashion. Starting with Layer 7, which is a software application at the top, each layer communicates with its immediate layers. As the layers get lower, the information to be sent out is increasing packaged for the specific hardware of the device, ending in Layer 1, which is the physical communication channel itself. Under TCP/IP, Layers 1-2 are implemented as a subnet (or MAC) stack, Layer 3 as the Internet (or IP) stack, Layer 4 as the transport (or TCP/UDP) stack, and Layers 5-7 as the Application stack. Each stack is usually implemented by a software and hardware combination. Typically, data is generated by a first network device and is processed down the protocol stacks, from Layer 7 to Layer 1, into a packet, with each stack adding a header to the packet. The packet can then be sent via a physical channel to a second network device. The second network device processes the packet up the stacks starting from Layer 1, and unwraps the respective headers after terminating them at their associated stacks. At Layer 7, the application data of the first device is retrieved for interaction with the application of the second device.
FIG. 3 illustrates the various headers of an IP packet. Each IP packet consists of a data portion for carrying the data payload and a header portion for carrying overhead information. The header portion is further partitioned into layer- or protocol-dependent headers. For example, a Layer 2 or MAC header includes a destination MAC address and a source MAC address that respectively specify the destination and source hardware addresses of a node in a subnet. On a LAN, an IP packet is directed to a destination device by its destination MAC address. A Layer 3 or IP header includes a source IP address and a destination IP address that respectively specify the IP addresses of the source and destination nodes on the Internet. On the Internet, an IP packet is directed to a destination device by its destination IP address. A Layer 4 or TCP header includes a source TCP port and a destination TCP port that respectively specify the port numbers used by the source node and the destination node. On a device, an IP packet is directed to a destination port by its port number. In general, transporting a packet from one location to other requires processing of Layers 2-4 header information.
The data portion of the IP packet contains Layer 7 information, which is data generated by the application. In web applications, the data will include HTTP headers. Since HTTP is not one of the basic OSI or TCP protocols, but a High level protocol associated with web applications, its header is therefore regarded as application data and therefore located in the data portion of the IP packet. The HTTP header includes an URL field for specifying the URL the packet is requesting. It may also include a cookie field for the application to communicate environmental information with the client.
As mentioned earlier, each device communicating on the Internet implements the TCP/IP stacks. For example, when a client computer running a browser requests a web page from a server, the client packets are typically routed by a number of routers and possibly a web switch before reaching the destination server. When a router intercepts the packets, it is processed from Layer 1 up to Layer 3, so that Layer 3 information such as the source and destination IP addresses can be extracted in order for the router to route the packet to the next device. When the packets get to a conventional Web switch, the packets are only processed from Layer 1 up to Layer 4. In general, the upper layer information can only be obtained after the all the lower layer stacks have been processed or xe2x80x9cterminatedxe2x80x9d. Thus, the upper or deeper layer information of an IP packet requires more processing to obtain.
FIG. 2 also lists the common types of routing and switching that can take place at the various layers. LAN switches, such as an Ethernet switch for a LAN operate at Layer 2 or the subnet stack of TCP/IP. Routers, operating at Layer 3 or the network layer, allow IP switching in which IP packets may be routed to a node having an IP address on the Internet. A router basically examines the destination IP address on a packet, looks up its routing table for the output port number in order to send the packet to the next node.
As mentioned earlier, a web switch is employed to switch an incoming client packet to one of many parallel web servers in a data center. In conventional implementations, its primary task is to perform a load-balancing function, i.e., to distribute an incoming packet to the least busy server among the server farm. This is accomplished by monitoring the load condition of each server, and dynamically changing the IP and MAC addresses of a packet so that the packet is directed to the least busy server.
In order to select the appropriate server, it is sometime necessary to consider the type of service being requested. For example, the data center may have a group of HTTP servers dedicated for web service; or a group of S-HTTP servers dedicated for secure web service; or a group of SMTP servers dedicated for Simple Mail Transfer Protocol service; or a group of FTP servers dedicated for File Transfer Protocol service. In that situation, it is necessary for a web switch to determine the type of service requested in order to select a server from the appropriate group. When the service is associated with a particular transport protocol, Layer 4 header information will be useful in helping to select an appropriate server.
FIG. 4 illustrates conventional TCP port assignments for some of the more standard services. The Layer 4 header of a packet contains the destination TCP port number. By convention if the destination TCP port number is 80, it can be assumed that the packet is associated with HTTP protocol and therefore a web application. Similarly, if the port number is 25, the service is assumed to be SMTP, or if the port number is 20, the service is assumed to be FTP, etc.
Thus, existing web switches are capable of switching an incoming packet to the most appropriate server, based on server load conditions and/or Layer 4""s transport layer information. More recently, there have even been suggestions of more refined load balancing based on Layer 7, or application layer information, taking into account information derived from the HTTP header, such as URL and cookie.
Also, there have been suggestions of making web switches capable of switching with some notion of Quality-of-Service (xe2x80x9cQoSxe2x80x9d). This is in view of certain applications, such as those involving Voice-Over-IP (xe2x80x9cVoIPxe2x80x9d) service under the H.323 standard, requiring a minimum standard for connection stability, low latency and bandwidth. The suggested solution is to provide dedicate VoIP servers that can provide the necessarily quality of service for this purpose, and to have the web switch recognize VoIP packets through Layer 4 information in order to switch them to the VoIP servers. Thus QoS is provided essentially by switching the packets associated with a special application to a server dedicated to serving such special application.
Generally, load-balancing schemes enable the capacity of a website to be scaled to meet demand, and existing QoS schemes allow switching to a dedicated server that can provide the required quality of service. However, due to the enormous number of clients on the Internet that could potentially access a website, there will be times when the budgeted capacity of a website is exceeded. This is especially the case during certain peak times when a website could experience spikes in demand. For example, an online merchandising website could be especially busy during holiday seasons when the demand could increase by orders of magnitude. Under those peak demand circumstances, no amount of load balancing will suffice since all the available servers in the server farm are already fully committed. When additional requests arrive, the web switch can only make a best effort attempt to deliver the packets to the saturated servers.
As the servers becomes busier with more requests, the quality of service decreases as a nonlinear functions of the number of requests. With existing web switch capabilities, once the server farm is saturated, the quality of service deteriorates drastically for all clients accessing the website. There is no provision for distinguishing clients of differing importance or to accord clients of high importance preferential access. Nor is there provision for ensuring sufficient server headroom so that clients of high importance will be served on demand. For example, this would be of significance for an online merchandising website during holiday seasons when excessive traffic may reduce the website to a crawl or render it totally incapacitated. It would be desirable to give preferred customers preferential access. A preferred customer may be one who is on a shopping cart page as compared to a regular customer who is merely browsing the catalog. Conversely, when certain client packets are deemed less preferential, it would be desirable to have a way to identify them and accord them with the appropriate quality of service, of lack thereof. In security applications, it would be desirable to be able to identify those packets that are xe2x80x9cpacket non-grataxe2x80x9d and have the switch direct them elsewhere or to drop them altogether.
According to one aspect of the present invention, a content-aware application switch and methods thereof intelligently switches client packets to one server among a group of servers in a server farm. The switch uses Layer 7 or application content parsed from a packet to help select the best server and to prioritize the transmitting of the packet to the server.
The application switch comprises a buffer controller, a packet classifier, a set of tables, and a transmit controller. The buffer controller is responsible for receiving, buffering and transmitting a packet on route to a server. The packet classifier parses the Layer 7 or application layer content from the packet and assigns to it a predefined content class. The assigned content class identifies the nature of the application associated with the packet, and in combination with the set of tables, provides application-specific information for the transmit controller to perform load balancing and Quality-of-Service (xe2x80x9cQoSxe2x80x9d) control.
In a preferred embodiment, applications and therefore packets associated with them are assigned priorities as either being HIGH, MEDIUM, or LOW. A QoS controller included in the transmit controller maintains a set of packet queues for each server among the group of servers. Each set contains three queues corresponding to the three priority types.
The queues are such that the lower priority queues are held back in response to the workload of its server reaching a predefined level.
The QoS controller schedules transmission of the packets by picking the packets off the queues, such that HIGH priority queues are picked before MEDIUM priority queues, and MEDIUM priority queues are picked before LOW priority queues. In addition, when picking the MEDIUM and LOW priority queues, the QoS controller is cognizant of the current workload of the server and mindful that certain server headroom is maintained. This provides provisioning of server headroom for high priority packets during switching of lower priority packets.
The invention provides improved load-balancing and Quality-of-Service control tailored to the application being switched. QoS control is effected at the switch on a packet-by-packet level and is applicable to any server. This provides more flexibility and control compared to conventional implementations where applications requiring a high quality of service are identified by their transport protocol and then directed to dedicated servers.
According to another aspect of the invention, a slow-start method assigned an initially boosted server load metric to a server newly added to a group of servers under load balancing. The method comprises boosting the new server load metric to decrease, over a predetermined period, the disparity between the server load metrics of the new server and that of other servers in the group of servers. This alleviates the problem of the new server being swamped initially due to a very low load metric compared to that of others in the group of servers.
In a preferred embodiment, the boosting is halved at predetermined intervals until the boosting is reduced to unity when the disparity between the server load metrics is less than a predetermined amount.
According to yet another aspect of the invention a switching method dependent on Layer 7 content is provided that avoids delayed binding in a new TCP session. Layer 7 content is not available during the initial handshaking phase of a new TCP session. The method uses the Layer 7 content from a previous session as an estimate to help select the server and uses a default priority to scheduling the transmitting of the handshaking packets. Updated Layer 7 content available after the handshaking phase is then used to reset the priority for the transmit schedule and is available for use in load balancing of the next TCP session. The inventive method enables content-aware switching without incurring delay and excessive processing while initially waiting for content to become available in order to make switching decisions.
Additional objects, features and advantages of the present invention will be understood from the following description of its preferred embodiments, which description should be taken in conjunction with the accompanying drawings.